package com.book.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.book.model.entity.BookDetail;
import com.book.mapper.BookDetailMapper;
import com.book.model.vo.IsbnBookDetailVO;
import com.book.service.BookDetailService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.book.util.BookUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.IOException;
import java.util.List;

/**
 * <p>
 * 书本详情 服务实现类
 * </p>
 *
 * @author auto
 * @since 2025-04-04 10:57:26
 */
@Service
public class BookDetailServiceImpl extends ServiceImpl<BookDetailMapper, BookDetail> implements BookDetailService {

    @Autowired
    private BookUtil bookUtil;
    @Override
    public BookDetail getBookDetailById(String id) {
        return this.getById(id);
    }

    @Override
    public IsbnBookDetailVO getBookDetailByIsbn(String id) throws IOException {
        return bookUtil.getBookMessageByIsbn(id);
    }
}
